<?php

/* @var $factory \Illuminate\Database\Eloquent\Factory */

use App\Models\Movie;
use Illuminate\Support\Str;
use Faker\Generator as Faker;
use Carbon\Carbon;
use App\Handlers\GetImagesUrlHandler;

$factory->define(Movie::class, function (Faker $faker) {
    $areas = ['中国大陆', '中国香港', '中国台湾', '美国', '韩国', '日本', '英国', '意大利'];
    $types = ['恐怖', '喜剧', '军事', '战争', '犯罪', '动画', '悬疑'];
    $created_at = Carbon::now();
    $section = $faker->numberBetween(8,120);
    $updated_desc_date = collect(['每天', '周一至周四', '周末', '周三', '周一至周五', '周六', '周一、周三、周五']);
    $updated_desc_time = collect(['20:00', '20:30', '18:00', '19:00', '19:30', '21:00', '00:00', '22:00']);
    return [
        'name' => $faker->name,
        'introduction' => $faker->text(),
        'area' => $areas[array_rand($areas)],
        'created_at' => $created_at,
        'updated_at' => $created_at,
        'score' => rand(3,9) + rand(0, 9) / 10,
        // 'top_image' => app(GetImagesUrlHandler::class)->get(),
    ];
});
